﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.MessageProxy {
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class ESBListenerAttribute : Attribute {
        public string Topic { get; internal set; }
        public string ID { get; internal set; }

        public ESBListenerAttribute(string topic, string id) {
            Topic = topic;
            ID = id;
        }

        public ESBListenerAttribute(Type topicType, string id) :
            this(topicType.Name, id) { }

        public ESBListenerAttribute(Type topicType) : this(topicType, topicType.Name) { }
    }
}
